import socket

client=socket.socket()
ip_port=('127.0.0.1',8888)
client.connect(ip_port)
while True:
    data=client.recv(1024)
    print(data.decode(encoding='utf-8'))
    msg=input('Input the message to send: ')
    client.send(msg.encode(encoding='utf-8'))
    if msg == 'exit':
        break
    data=client.recv(1024)
    print(data.decode(encoding='utf-8'))
